package P110_Exception;

import java.util.ArrayList;
import java.util.List;

/**
 * 封装异常
 */
public class MyException {

    //所有异常
    private List<Throwable> causes = new ArrayList<Throwable>();

    public MyException(List<? extends Throwable> causes) {
        this.causes.addAll(causes);
    }

    //返回所有异常
    public List<Throwable> getCauses() {
        return causes;
    }
}
